/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.toools.gwt.wmc.client.company;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

import java.util.Collection;
import org.toools.gwt.wmc.jpa.Company;

/**
 *
 * @author Manuel
 */
public interface CompanyService extends RemoteService{

    public static class Util {
		private static CompanyServiceAsync instance;
		public static CompanyServiceAsync getInstance(){
			if (instance == null) {
				instance = (CompanyServiceAsync) GWT.create(CompanyService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getHostPageBaseURL() + "WMC/CompanyService");
			}
			return instance;
		}
	}
    
    public Company getCompanyByID( Integer id );
    public Collection<Company> getCompanies();

    public Company create( Company c );
    public Boolean delete( Company c );
    public Boolean update( Company c );
}
